package domain;

public enum TypeOfOrder {
	SELL(2), BUY(1);
	
	Integer integer;
	TypeOfOrder(Integer integer){
		this.integer = integer;
	}
	
	int value() {
		return integer;
	}
	public String toString(){
		return integer.toString();
	}
	public static TypeOfOrder parse(Integer value){
		for(TypeOfOrder val : TypeOfOrder.values()){
			if (val.value() == value) return val;
		}
		return null;
	}
}
